![]() |
SetMenuItemProperty |
||||
Header: | Menus.h | Carbon status: | Supported | |
Associates data with a menu item.
OSStatus SetMenuItemProperty ( MenuHandle menu, UInt16 item, OSType propertyCreator, OSType propertyTag, UInt32 propertySize, const void *propertyData );
A handle to the menu containing the item with which you wish to associate data.
The item number of the menu item or 0 if the data is to be associated with the menu as a whole.
A four-character code. Pass your program’s signature, as registered through Apple Developer Technical Support. If your program is of a type that would not normally have a signature (for example, a plug-in), you should still register and use a signature in this case, even though your program’s file may not have the same creator code as the signature that you register. The 'macs' property signature is reserved for the system and should not be used.
A four-character code. Pass a value identifying the data. You define the tag your application uses to identify the data; this code is not to be confused with the file type for the data, but may coincide if you wish.
The size of the data.
A pointer to the data.
A result code.
You may use the SetMenuItemProperty function to associate any type of data with a menu item.
See also the GetMenuItemProperty and RemoveMenuItemProperty functions.
This function is available with Mac OS 8.5 and later.
Supported in Carbon. Available in CarbonLib 1.0 and later when MenusLib 8.5 or later is installed. Exported by CarbonLib 1.0 and later and by MenusLib 8.5 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)